<?php
class thumbBox {
    function getProjects($table, $catId, $limit) {
        $connect = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
        $query = $connect->query("SELECT time, object, client, thumb, url, tasks, summary FROM ".$prefix.$table." WHERE catid = ".$catId." ORDER BY time DESC LIMIT ".$limit."");

        while($row = $query->fetch_object()) {

            $time = date('F Y',strtotime($row->time));

            $this->thumbBox[] = array(
                "object" => $row->object,
                "client" => $row->client,
                "thumb" => $row->thumb,
                "url" => $row->url,
                "tasks" => $row->tasks,
                "summary" => $row->summary,
                "time" => $time
            );
        }
        return $this->thumbBox;
        $query->close();
        $connect->close();
    }
}

?>
